package com.zxy.controller;

import com.zxy.model.Inventory;
import com.zxy.model.InventoryQuery;
import com.zxy.service.InventoryService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/inventory")
public class InventoryController {

    @Resource
    private InventoryService inventoryService;

    @GetMapping
    public List<Inventory> select(InventoryQuery query) {
        return inventoryService.select(query);
    }
}